#include<bits/stdc++.h>
using namespace std;

string tree[30005], fg[30005];

void fun(int k) {
    if(tree[k].find("0") != -1) {
        if(tree[k].find("1") != -1)
            fg[k] = "F";
        else
            fg[k] = "B";
    } else {
        fg[k] = "I";
    }

    if(tree[k].size() == 1)	return ;

    string t1 = tree[k].substr(0, tree[k].size() / 2);
    string t2 = tree[k].substr(t1.size(), tree[k].size() / 2);

    tree[k * 2] = t1;
    tree[k * 2 + 1] = t2;

    fun(k * 2);
    fun(k * 2 + 1);
}

void lrd(int root) {
    if(fg[root * 2] != "")
        lrd(root * 2);
    if(fg[root * 2 + 1] != "")
        lrd(root * 2 + 1);
    cout << fg[root];
}

signed main() {
    int n;
    string s;
    cin >> n >> s;
    tree[1] = s;
    fun(1);
    lrd(1);
    return 0;
}

